package cn.logicalthing.demo.web.error;
public class RequestBean {

    private int code;
    private String message;
    private Object data;

    public RequestBean(ErrorCode errorCode) {
        this.code = errorCode.code();
        this.message = errorCode.message();
    }
    public RequestBean(ErrorCode errorCode,Object data) {
        this.code = errorCode.code();
        this.message = errorCode.message();
        this.data = data;
    }


    public RequestBean(String message, Object data) {
        this.code = 200;
        this.message = message;
        this.data = data;
    }

    public RequestBean(String message) {
        this.code = 200;
        this.message = message;
        this.data = null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
